package com.wind.taobao.api.trade.trade.rest
{
	import com.wind.taobao.api.IPrivateAPI;
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	/**
	 * taobao.trades.sold.increment.get Request
	 * @author fxy
	 *
	 */
	public class TradesSoldIncrementGetRequest extends TaobaoRequest implements IPrivateAPI
	{
		public override function get method():String
		{
			return "taobao.trades.sold.increment.get"
		}
		/**
		 *  Y
		 *  需要返回的字段。目前支持有：<br>
		 *  1. Trade中可以指定返回的fields： seller_nick,buyer_nick,title,type,created,sid,tid,seller_rate,buyer_rate,status,payment,discount_fee, adjust_fee,post_fee,pay_time,end_time,consign_time,modified,buyer_obtain_point_fee,point_fee, real_point_fee,received_payment,pic_path,iid,num,price,cod_fee,shipping_type<br>
		 *  2. Order中可以指定返回fields： orders.title,orders.pic_path,orders.price,orders.num,orders.iid,orders.sku_id,orders.refund_status, orders.status,orders.tid,orders.total_fee,orders.payment,orders.discount_fee,orders.adjust_fee, orders.outer_iid,orders.outer_sku_id,orders.sku_properties_name,orders.item_meal_name<br>
		 *  3. fields：orders（返回Order的所有内容）
		 */
		[Bindable]
		public var fields:String="seller_nick,buyer_nick,title,type,created,sid,tid,seller_rate,buyer_rate,status,payment,discount_fee,adjust_fee,post_fee,pay_time,end_time,consign_time,modified,buyer_obtain_point_fee,point_fee, real_point_fee,received_payment,pic_path,iid,num,price,cod_fee,shipping_type,orders"; // 	
		/**
		 * Y 	 查询修改时间开始(修改时间跨度不能大于一天)。格式:yyyy-MM-dd HH:mm:ss
		 */
		[Bindable]
		public var start_modified:String;
		/**
		 * Y 	查询修改时间结束(修改时间跨度不能大于一天)。格式:yyyy-MM-dd HH:mm:ss
		 */
		[Bindable]
		public var end_modified:String;
		/**
		 * 	N 交易状态。可选值:<br>
		 * TRADE_NO_CREATE_PAY(没有创建支付宝交易)<br>
		 * WAIT_BUYER_PAY(等待买家付款)<br>
		 * WAIT_SELLER_SEND_GOODS(等待卖家发货,即:买家已付款)<br>
		 * WAIT_BUYER_CONFIRM_GOODS(等待买家确认收货,即:卖家已发货)<br>
		 * TRADE_BUYER_SIGNED(买家已签收,货到付款专用)<br>
		 * TRADE_FINISHED(交易成功)<br>
		 * TRADE_CLOSED(交易关闭)<br>
		 * TRADE_CLOSED_BY_TAOBAO(交易被淘宝关闭)<br>
		 * ALL_WAIT_PAY(包含：WAIT_BUYER_PAY、TRADE_NO_CREATE_PAY)<br>
		 * ALL_CLOSED(包含：TRADE_CLOSED、TRADE_CLOSED_BY_TAOBAO)
		 */
		[Bindable]
		public var status:String;
		/**
		 *	N 交易类型。可选值:<br>
		 * fixed(一口价)<br>
		 * auction(拍卖)<br>
		 * guarantee_trade(一口价、拍卖)<br>
		 * auto_delivery(自动发货)<br>
		 * independent_shop_trade(外部网店)<br>
		 * ec(直冲)<br>
		 * cod(货到付款)<br>
		 * fenxiao(分销)<br>
		 * game_equipment(游戏装备)<br>
		 *默认同时查询guarantee_trade、auto_delivery、ec、cod的4种交易类型的数据
		 */
		[Bindable]
		public var type:String;
		/**
		 *	N 	页码。取值范围:大于零的整数; 默认值:1
		 */
		[Bindable]
		public var page_no:int;
		/**
		 * N 	每页条数。取值范围:大于零的整数; 默认值:40;最大值:100
		 */
		[Bindable]
		public var page_size:int;

		public override function validate():void
		{
			if (!TaobaoUtils.hasAllValue([fields, start_modified, end_modified]))
			{
				throw new InvalidRequestParametersException("请求参数[fields,start_modified,end_modified]不能为空");
			}
		}
	}
}